-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many added mnemonics and fixes #5
base: master
Are you sure you want to change the base?
Conversation
Added missing registers (X, Y, Z, PC, ZERO), missing instructions (adiw, icall), #-directives Labels after jump command (e.g. rjmp, brcs, etc.) are now colored.
Update avr-asm.tmLanguage
Added: Commands: adiw, mul, muls, mulsu, fmul, fmuls, mfulsu, eijmp, jmp, icall, eicall, call, elpm, espm. Added: Directives: elseif, word, warning. Fixed: Conflicts[]:
Fixed: Conflicts[]: - 1. Between ".cseg" and ".csegsize" - 2. Between ".endm" and ".endmacro" - 3. Between ".elif"/".else" and ".elseif" - 4. Between ".if" and ".ifdef"/".ifndef" - 5. Between ".list" and ".listmac"
{ | ||
"match": "(?i)\\br(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\\b", | ||
"match": "(?i)\\bR(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you make uppercase for general purpose registers? This does not take effect because regex is configured with ?i (case insensitive mode).
{ | ||
"match": "(?i)\\b(xl|xh|yl|yh|zl|zh)\\b", | ||
"match": "(?i)\\b(XL|XH|YL|YH|ZL|ZH)\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as previous comment.
{ | ||
"match": "(?i)(^|\\s)\\.(byte|cseg|csegsize|db|dd|def|device|dq|dseg|dw|elif|else|endif|endm|endmacro|equ|error|eseg|exit|if|ifdef|ifndef|include|list|listmac|macro|message|nolist|org|set|undef)", | ||
"match": "(?i)(^|\\s)\\.(byte|csegsize|cseg|db|dd|def|device|dq|dseg|dw|elseif|elif|else|endif|endmacro|endm|equ|error|eseg|exit|ifdef|ifndef|if|include|listmac|list|macro|message|nolist|org|set|undef|word|warning)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you're trying to fix problem with partial highlighting of several directives. Proper fix is to wrap this match with \b regex anchor like this was done with mnemonics.
@@ -137,7 +168,7 @@ | |||
<key>comment</key> | |||
<string>Dec number constant</string> | |||
<key>match</key> | |||
<string>\b(0|[1-9]\d+)\b</string> | |||
<string>\-?\b(\d+)\b</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't try to directly edit *.tmLanguage file. Your changes will be lost since the file is generated from *.JSON-tmLanguage one.
Some significant fixes )) All fixes see in previous commits